<script>
$(function(){
	$(".sort").tablesorter({widgets: ['zebra']});

	$("#lbl_data").html($("#date_imp").val());
});
</script>
<div class="ui-corner-all" style="padding: 10px; border: 1px solid gray; background: white; position: fixed; z-index: 1000; top: 30px; left: 50%; margin-left: -250px; width: 500px;">
	<div style="text-align: right; margin-bottom: 8px;">Relatorio Gerado dia <?php echo date("d/M/Y")?></div>
	<?php if($this->dados["data_unica"]): ?>
	<hr style="margin-bottom: 5px;" />
	<table style="font-weight: bold;">
		<tr>
			<td>
				Data
			</td>
			<td>
				:
			</td>
			<td>
				<label id="lbl_data"><?php echo $this->dados["data_unica"]; ?></label>
			</td>
		</tr>
	</table>
	<?php endif; ?>
	<?php if($this->dados["data_ini"] && $this->dados["data_fim"]): ?>
	<table>
		<tr>
			<td>
				Data Inicio
			</td>
			<td>
				:
			</td>
			<td>
				<label id="lbl_data"><?php echo $this->dados["data_ini"]; ?></label>
			</td>
			<td>
				Data Fim
			</td>
			<td>
				:
			</td>
			<td>
				<label id="lbl_data"><?php echo $this->dados["data_fim"]; ?></label>
			</td>
		</tr>
	</table>
	<?php endif; ?>
	<hr style="margin-top: 5px; margin-bottom: 5px;" />
	<table class="sort" width="100%" cellspacing="1" cellpadding="5" style="font-size: 15px;">
		<thead>
			<tr>
				<th>
					Funcionario
				</th>
				<th>
					Total
				</th>
			</tr>
		</thead>
		<tbody>
			<?php if(!$this->rs): ?>
			<tr>
				<td>
					<i>Nenhum registro encontrado.</i>
				</td>
			</td>
			<?php endif; ?>
			<?php 
			foreach ($this->rs as $key => $val)
			{
			?>
			<tr>
				<td>
					<?php echo $val["caf01_user"]; ?>
				</td>
				<td>
					R$<?php echo Num::money($val["total"]); ?>
				</td>
			</tr>
			<?
			}
			?>
		</tbody>
	</table>
	<hr style="margin: 10px 0 10px 0;" />
	<div>
		<div class="button ui-corner-all" onclick="$('.bg_transp').hide(); $('.ajax-relatorio').hide();" style="text-align: center; padding: 20px;">
			<b>Fechar</b>
		</div>
	</div>
</div>